<?php
$this->pageTitle = '在线支付';
?>
<div class="wp">
    <div class="cl order_commont tm10">
        <div class="z">订单号：<?php echo $row['id']; ?><span class="pipe">|</span>预计送餐时间：<?php echo $row['receiptDate'] . '&nbsp;' . $row['receiptTime']; ?></div>
        <div class="y"><?php echo $row['createDate']; ?></div>
    </div>
    <?php
    $this->widget('ext.kindeditor.KindEditorWidget', array(
        'id' => 'OrderForm_commont', //Textarea id
        'name' => 'OrderForm[commont]',
        'language' => 'zh_CN',
        // Additional Parameters (Check http://www.kindsoft.net/docs/option.html)
        'items' => array(
            'langType' => 'zh_CN',
            'width' => '1200px',
            'height' => '200px',
            'class' => 'tm10',
            'themeType' => 'simple',
            'allowImageUpload' => true,
            'allowFileManager' => true,
            'items' => array(
                'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic',
                'underline', 'removeformat', '|',
                'emoticons', 'link',),
        ),
    ));
    ?>
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'commont-form',
        'action' => 'order/receipt',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    ));
    ?>
    <?php foreach ($row['orderItems'] as $key => $value) {
        ?>
        <div class="cl order_commont_list tm10">
            <div class="img z"><a href="<?php echo $this->createUrl('site/product', array('id' => $value['productSkuId'])); ?>"><img src="<?php echo $value['img']; ?>"/></a></div>
            <div class="name z"><a href="<?php echo $this->createUrl('site/product', array('id' => $value['productSkuId'])); ?>"><?php echo $value['productName']; ?></a></div>
            <div class="price z c_orange f_20"><?php echo number_format($value['price'], 2); ?></div>
            <div class="amound z">×<?php echo $value['amount']; ?></div>
            <div class="totalprice z c_orange f_20"><?php echo number_format($value['price'] * $value['amount'], 2); ?></div>
        </div>
        <?php echo $form->hiddenField($model, 'productId[]', array('value' => $value['productId'])); ?>
        <?php
    }
    ?>
    <?php echo $form->hiddenField($model, 'orderId', array('value' => $orderId)); ?>
    <?php echo $form->textArea($model, 'commont', array('class' => 'notearea tm10')); ?>
    <?php echo $form->error($model, 'commont'); ?>
    <div class="cl tm20 cartbt">
        <?php echo CHtml::submitButton('确认收货并评价', array('class' => 'submit submit_blue y lm15 cart-buy-btn')); ?><span class="y" style="line-height:36px;">实付金额：<b class="c_orange f_20">￥<?php echo number_format($row['productTotalPrice'], 2); ?></b></span><span class="y" style="line-height:36px;margin-right: 20px;">配送费用：<b class="c_orange f_20" style="text-decoration: line-through">￥0.00</b></span>
    </div>
    <?php $this->endWidget(); ?>
</div>